package org.ytor.core.sysapi.depart.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ytor.common.util.bean.Beans;
import org.ytor.core.model.BaseReq;
import org.ytor.core.sysapi.depart.model.SysDepart;

/**
 * created by yangtong on 2025年6月2日 21:35:23
 * <br/>
 * 部门表Req表实体类
 * <br/>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "部门表")
public class SysDepartReq extends BaseReq<SysDepart, String> {

    /**
     * 上级部门id
     */
    @Schema(description = "上级部门id")
    private String pid;

    /**
     * 部门名称
     */
    @Schema(description = "部门名称")
    private String departName;

    /**
     * 部门类型
     */
    @Schema(description = "部门类型")
    private Integer type;

    /**
     * 部门联系人username
     */
    @Schema(description = "部门联系人username")
    private String contactUserName;

    /**
     * 部门地址
     */
    @Schema(description = "部门地址")
    private String address;


    @Override
    public SysDepart toEntity() {
        return Beans.copyProperties(this, SysDepart.class);
    }
}